| Disk ARchive 2.8.1 Full featured and portable backup and archiving tool

Loading...
Searching...
No Matches
libdar_xform.hpp
Go to the documentation of this file.
1/*********************************************************************/
2// dar - disk archive - a backup/restoration program
3// Copyright (C) 2002-2025 Denis Corbin
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program; if not, write to the Free Software
17// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18//
19// to contact the author, see the AUTHOR file
20/*********************************************************************/
21
25
26#ifndef LIBDAR_XFORM_HPP
27#define LIBDAR_XFORM_HPP
28
29#include "../my_config.h"
30#include "infinint.hpp"
31#include "user_interaction.hpp"
32#include "archive_aux.hpp"
33
34#include <memory>
35
36 namespace libdar
37{
38
41
43
44 class libdar_xform
45 {
46 public:
48
57 libdar_xform(const std::shared_ptr<user_interaction> & ui,
58 const std::string & chem,
59 const std::string & basename,
60 const std::string & extension,
61 const infinint & min_digits,
62 const std::string & execute);
63
65
68 libdar_xform(const std::shared_ptr<user_interaction> & dialog,
69 const std::string & pipename);
70
72
75 libdar_xform(const std::shared_ptr<user_interaction> & dialog,
76 int filedescriptor);
77
79 libdar_xform(const libdar_xform & ref) = delete;
80
82 libdar_xform(libdar_xform && ref) noexcept;
83
85 libdar_xform & operator = (const libdar_xform & ref) = delete;
86
88 libdar_xform & operator = (libdar_xform && ref) noexcept;
89
91 ~libdar_xform();
92
94
119 void xform_to(const std::string & path,
120 const std::string & basename,
121 const std::string & extension,
122 bool allow_over,
123 bool warn_over,
124 const infinint & pause,
125 const infinint & first_slice_size,
126 const infinint & slice_size,
127 const std::string & slice_perm,
128 const std::string & slice_user,
129 const std::string & slice_group,
130 hash_algo hash,
131 const infinint & min_digits,
132 const std::string & execute);
133
135
139 void xform_to(int filedescriptor,
140 const std::string & execute);
141
142 private:
143 class i_libdar_xform;
144 std::unique_ptr<i_libdar_xform> pimpl;
145
146 };
147
149
150} // end of namespace
151
152#endif
archive_aux.hpp
set of datastructures used to interact with a catalogue object
libdar::infinint
the arbitrary large positive integer class
Definition real_infinint.hpp:62
libdar::libdar_xform::i_libdar_xform
class implementing the dar_xform feature
Definition i_libdar_xform.hpp:45
libdar::libdar_xform
class implementing the dar_xform feature
Definition libdar_xform.hpp:45
libdar::libdar_xform::libdar_xform
libdar_xform(const std::shared_ptr< user_interaction > &dialog, int filedescriptor)
< if pipename is set to "-" reading from standard input
libdar::libdar_xform::libdar_xform
libdar_xform(const libdar_xform &ref)=delete
copy constructor is not allowed
libdar::libdar_xform::libdar_xform
libdar_xform(const std::shared_ptr< user_interaction > &ui, const std::string &chem, const std::string &basename, const std::string &extension, const infinint &min_digits, const std::string &execute)
the archive to transform is read from a set of slices
libdar::libdar_xform::operator=
libdar_xform & operator=(const libdar_xform &ref)=delete
assignment operator is not allowed
libdar::libdar_xform::xform_to
void xform_to(const std::string &path, const std::string &basename, const std::string &extension, bool allow_over, bool warn_over, const infinint &pause, const infinint &first_slice_size, const infinint &slice_size, const std::string &slice_perm, const std::string &slice_user, const std::string &slice_group, hash_algo hash, const infinint &min_digits, const std::string &execute)
the resulting archive is a written to disk possibly multi-sliced
libdar::libdar_xform::xform_to
void xform_to(int filedescriptor, const std::string &execute)
the resulting archive is a single sliced archive sent to a filedescriptor
libdar::libdar_xform::~libdar_xform
~libdar_xform()
destructor
libdar::libdar_xform::libdar_xform
libdar_xform(libdar_xform &&ref) noexcept
move constructor
libdar::libdar_xform::libdar_xform
libdar_xform(const std::shared_ptr< user_interaction > &dialog, const std::string &pipename)
the archive to transform is read from a named pipe
libdar::path
the class path is here to manipulate paths in the Unix notation: using'/'
Definition path.hpp:51
libdar::hash_algo
hash_algo
hashing algorithm available
Definition archive_aux.hpp:63
infinint.hpp
switch module to limitint (32 ou 64 bits integers) or infinint
my_config.h
include macro defined by the configure script and some specific additional ones
libdar
libdar namespace encapsulate all libdar symbols
Definition archive.hpp:47
user_interaction.hpp
defines the interaction interface between libdar and users.